-- GENERATED SPELL FOR [Alandien] --


function spell0_21171(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(39262,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21171', 1000, 1)
end

function spell1_21171(pUnit, Event) --@Metamorphosis,Self--
pUnit:FullCastSpellOnTarget(36298,pUnit)
pUnit:RegisterEvent('Sorts_21171', 601, 1)
end

function spell2_21171(pUnit, Event) --@Shadowfury,n/a--
pUnit:FullCastSpellOnTarget(39082,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21171', 3000, 1)
end

function Sorts_21171(pUnit, Event)
local choix_sorts_21171 = math.random(0, 2)
if choix_sorts_21171 == 0 then
pUnit:RegisterEvent('spell0_21171', 1, 1)
end
if choix_sorts_21171 == 1 then
pUnit:RegisterEvent('spell1_21171', 1, 1)
end
if choix_sorts_21171 == 2 then
pUnit:RegisterEvent('spell2_21171', 1, 1)
end
end

function mob21171_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21171', math.random(1500, 3000), 1)
end

function mob21171_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21171_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21171_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21171, 1, 'mob21171_Action')
RegisterUnitEvent(21171, 2, 'mob21171_Leave')
RegisterUnitEvent(21171, 3, 'mob21171_Kill')
RegisterUnitEvent(21171, 4, 'mob21171_Die')
